<template>
    <div>
        <!-- 修改岗位 -->
        <el-form :model="formDate" ref="form" label-width="80px" :inline="false">
            <el-form-item label="岗位编码">
                <el-input v-model="formDate.postCode"></el-input>
            </el-form-item>
            <el-form-item label="岗位名称">
                <el-input v-model="formDate.postName"></el-input>
            </el-form-item>
            <el-form-item label="岗位排序">
                <el-input-number v-model="formDate.postSort" :min="0" :max="1000" controls-position="right" size="large"
                @change="handleChange" />
            </el-form-item>
            <el-form-item label="岗位状态">
                <el-radio-group v-model="formDate.status">
                    <el-radio value="0">正常</el-radio>
                    <el-radio value="1">停用</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="备注">
                <el-input v-model="formDate.remark"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">立即修改</el-button>
                <el-button>取消</el-button>
            </el-form-item>
         </el-form>
    </div>
</template>

<script setup>
import {defineEmits,defineProps} from 'vue';
import request from "@/api/request";
let emits = defineEmits(['close'])
let props = defineProps(['data'])

let formDate = props.data
//排序框
const handleChange = (value) => {
  console.log(value)
}

let onSubmit = ()=>{
    request.put("slm/posts/update",formDate).then(resp=>{
        emits('close')
    })
}
</script>

<style lang='scss' scoped>

</style>
